#include <iostream>
#include <algorithm>

using namespace std;

const int N = 10100;

int n;
int a[N], f[N];

int main()
{
    scanf("%d", &n);
    cout << n << endl;
    for (int i = 1; i <= n; i ++ )
    {
        cout << i << " " ;
    }
    cout << endl;
    return 0;
}
